Skip to content

feat(report): annotate edge kind in chain and trace output#189

Merged
rocketman-code merged 1 commit intomainfrom
feat/edge-kind-annotation
Apr 23, 2026
Merged

feat(report): annotate edge kind in chain and trace output#189
rocketman-code merged 1 commit intomainfrom
feat/edge-kind-annotation

Conversation

@rocketman-code
Copy link
Copy Markdown
Owner

@rocketman-code rocketman-code commented Apr 23, 2026

BFS parents store (parent_id, EdgeId) tuples; chain results carry per-hop EdgeKind (Static/Dynamic). AnnotatedChain struct with modules(), edge_kinds(), classify(). ChainClassification uses internally tagged serde for uniform JSON objects (always {"type": "...", ...}).

Terminal renders -[static]-> / -[dynamic]-> arrows with classification summary. JSON chains gain modules, edge_kinds, classification fields. PackageEntry in trace output gains edge_kinds and classification (always all_static). Breaking JSON schema change.

Test plan:

  • cargo xtask check (fmt + clippy + 473 tests)
  • chainsaw trace --chain --include-dynamic on openclaw shows mixed chains with correct classification
  • chainsaw trace --chain --json verifies internally tagged classification shape

@rocketman-code rocketman-code force-pushed the feat/edge-kind-annotation branch from cdea52a to 288d7b2 Compare April 23, 2026 07:48
Track edge IDs through BFS parents so chain results carry per-hop
EdgeKind. AnnotatedChain struct wraps the result with modules(),
edge_kinds(), and classify(). ChainClassification (AllStatic, Mixed,
AllDynamic) uses internally tagged serde for uniform JSON objects.

Report layer surfaces annotations: ChainReport.chains becomes
Vec<AnnotatedChainReport> with modules, edge_kinds, classification.
PackageEntry gains edge_kinds and classification. Terminal renders
-[static]-> / -[dynamic]-> arrows with classification summary.

Breaking JSON schema change (pre-1.0).
@rocketman-code rocketman-code force-pushed the feat/edge-kind-annotation branch from 288d7b2 to 4aff5e5 Compare April 23, 2026 07:55
@rocketman-code rocketman-code merged commit 9062094 into main Apr 23, 2026
8 checks passed
@rocketman-code rocketman-code deleted the feat/edge-kind-annotation branch April 23, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant